import matplotlib.pyplot as plt
import pandas as pd
plt.rcParams['svg.fonttype'] = 'none'

# 创建数据框架
data = {
    'Round': [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],
    'SPS': [0.999840397,0.999832894,0.999539145,0.999701241,0.999331301,0.999297214,0.999768684,0.999781147,0.99932338,0.999658215],
    'OGS': [0.994761167,0.995520322,0.996453731,0.995956972,0.996156369,0.995259811,0.995681494,0.9961078,0.993662915,0.994156801],
    'ORDP': [0.999588639,0.999715645,0.999075063,0.999708599,0.999583861,0.999259747,0.999460469,0.999231898,0.999599601,0.999353655],
}

df = pd.DataFrame(data)

# 绘制数据
plt.figure(figsize=(8, 6))
plt.plot(df['Round'], df['SPS'], marker='s', markersize=10, label='SPS')
plt.plot(df['Round'], df['OGS'], marker='^', markersize=10, label='OGS')
plt.plot(df['Round'], df['ORDP'], marker='*', markersize=10, label='ORDP')

# plt.title('Comparison of SPF and Cplex Algorithms')
plt.xlabel('Round', fontsize=14)
plt.ylabel('Jain\'s Index', fontsize=14)
plt.legend(fontsize='large')  # 设置图例的字体大小为大

plt.grid(True)
# plt.show()
plt.savefig("plot_incluster_jain_var_capacity.svg", format="svg")
